package org.linlinjava.litemall.db.service;

import org.linlinjava.litemall.db.dao.LitemallQuanMapper;
import org.linlinjava.litemall.db.domain.LitemallQuan;
import org.linlinjava.litemall.db.domain.LitemallQuanExample;
import org.linlinjava.litemall.db.domain.LitemallUserEr;
import org.linlinjava.litemall.db.domain.LitemallUserErExample;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class LitemallQuanService {
    @Resource
    private LitemallQuanMapper quanMapper;

    public List<LitemallQuan> queryAll(Integer pid) {
        List<LitemallQuan> quanList = quanMapper.selectAll(pid);
        return quanList;
    }


    public void update(LitemallQuan litemallQuan) {
        quanMapper.updateByPrimaryKeySelective(litemallQuan);
    }

    public Object create(LitemallQuan litemallQuan) {
        int i = quanMapper.insertSelective(litemallQuan);
        return i;
    }

    public List<LitemallQuan> selectByDesc(String desc) {
       return quanMapper.selectByDesc(desc);
    }

    public List<LitemallQuan> queryAllQuan() {
        return quanMapper.selectAllQuan();
    }

    public LitemallQuan selectById(Integer id) {
        return quanMapper.selectById(id);
    }
}

